<!--suppress HtmlUnknownTag -->
<root xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="rds.html"/>

  <?python
      from mnemoply.utils import format_date
      import os,datetime
      from base64 import b64encode
      from mnemoply.model.agreement import Contract
      from mnemoply.utils import MonthYear, getBarcodeImage, read_binary_file
      from mnemoply.common_knowledge import month_captions
  ?>

  <report>
    <pages py:if="ids">
      <?python
           objs = [Contract.get(int(x)) for x in ids]
      ?>

      <page py:for="cnt in objs">
            <number py:content="str(cnt.student.id) +'-'+str(cnt.customer.id)"/>
            <customer py:content="cnt.customer.title" />
            <student py:content="cnt.student.fullName" />
            <birthday py:content="format_date(cnt.student.birthday)" />
            <school_name py:content="cnt.student.schoolName" />
            <school_form py:content="cnt.student.schoolForm" />
            <phone py:content="cnt.customer.phone_main"/>
            <email py:content="cnt.customer.email"/>
       </page>
    </pages>
  </report>

</root>
